package homework_06.home_02;

public class Rectangle {
    int length;
    int width;
    public Rectangle(int length, int width) {
        this.length = length;
        this.width = width;
    }
    public int getArea(){
        return length*width;
    }
    public  int getPer(){
        return  2*(length+width);
    }
    public void showAll(){
        System.out.println("长："+length);
        System.out.println("宽："+width);
        System.out.println("面积："+this.getArea());
        System.out.println("周长："+this.getPer());
    }
}
